<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@taglib uri="/syspermissions"  prefix="p"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
<title>报修单列表</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/pagejs.js"></script>
<script type="text/javascript">
//删除记录checkrepairs(${repairs.repairsid})
function checkdelete(repairsid){
if(confirm("确认删除这条记录吗"))
location.href="admin/deleteRepairs?repairsid="+repairsid;
}

//修改记录
function checkupdate(repairsid){
location.href="admin/findRepairsByid?repairsid="+repairsid;
}


//审核记录
function checkrepairs(repairsid){
location.href="admin/checkrepairsByid?repairsid="+repairsid;
}
</script>

</head>


<body>
 <form action="admin/pageRepairs.action" method="post">
	<div class="place">
    <span>位置</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">报修单列表信息</a></li>
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    
    	<ul class="toolbar">
    	  
    	<li class="click">设备编号:<input name="pageing.number" type="text" class="minput"/>
    	 <p:permissions menu="repairfindlab">
    	所属实验室:<input name="pageing.name" type="text" class="minput"/>
    	  </p:permissions>
    	报修单ID:<input name="pageing.repairsid" type="text" class="minput"/> 
    	<!-- 实验室ID：用于实验技术人员查询本实验室设备维修单 -->
    	<input name="pageing.uerlabid" value="${administrators.laboraryid}" type="hidden" class="minput"/> 
    	<input name="status" value="1" type="hidden" class="minput"/> 
    	&nbsp;&nbsp;&nbsp;&nbsp;
    	<input name="" type="submit" class="btn" value="查询"/></li>
        <li class="click"><a href="jsp/addrepairs.jsp"><span><img src="images/t01.png" /></span>添加</a></li>
        </ul>
        
        </form>
        <ul class="toolbar1">
        </ul>
    </div>
    <table class="tablelist">
    	<thead>
    	<tr>
        <th><input name="" type="checkbox" value="" checked="checked"/></th>
        <th>序号<i class="sort"><img src="images/px.gif" /></i></th>
        <th>报修单ID</th>
        <th>设备编号</th>
        <th>设备名称</th>
        <th>申请日期</th>
       <!--  <th>维修完成时间</th> -->
        <th>状态</th>
        <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <s:iterator value="pageingFinder.dataList" var="repairs" status="index">
        <tr>
        <td><input name="" type="checkbox" value="" /></td>
        <td><s:property value="#index.index+1"/></td>
        <td>${repairs.repairsid}</td>
        <td>${repairs.equipmentid}</td>
        <td>${repairs.name}</td>
        <td>
        <fmt:formatDate value='${repairs.repairdate}' type='date' pattern='yyyy-MM-dd HH:mm:ss'/>
        </td>
        <%-- <td>
        <fmt:formatDate value='' type='date' pattern='yyyy-MM-dd HH:mm:ss'/>
        </td> --%>
        <td>
        <s:if test="#repairs.status==1">未检查</s:if>
        <s:if test="#repairs.status==2">检查中</s:if>
        <s:if test="#repairs.status==3">维修完成</s:if>
        </td>
        <td>
        <input type="button" onclick="checkdelete(${repairs.repairsid})" value="删除"/>
        <input type="button" onclick="checkupdate(${repairs.repairsid})" value="修改"/>
        <input type="button" onclick="checkrepairs(${repairs.repairsid})" value="检查"/>
         </td>
        </tr> 
        </s:iterator>
        </tbody>
    </table>
    
   <form action="admin/pagerepairs.action" id="pageForm">
       <div class="pagin">
    	<div class="message">共<i class="blue">${pageingFinder.rowCount}</i>条记录<i class="blue">当前第${pageingFinder.pageNo}/${pageingFinder.pageCount}</i>页</div>
        <ul class="paginList">
        <s:if test="pageingFinder.pageNo > 1">
        <li class="paginItem"><a href="javascript:first()"><span class="pagepre">首页</span></a></li>
        <li class="paginItem"><a href="javascript:previous()"><span class="pagenxt">上一页</span></a></li>
        </s:if>
         <s:if test="pageingFinder.pageNo < pageingFinder.pageCount">
        <li class="paginItem"><a href="javascript:next()"><span class="pagepre">下一页</span></a></li>
        <li class="paginItem"><a href="javascript:last()"><span class="pagenxt">尾页</span></a></li>
        </s:if>
       <li> 转到第<input  name="pageingFinder.pageNo" id="inputPage" type="text" class="sinput"/>页
         <input type="hidden" id="hiddenPagge" value="${pageingFinder.pageCount }"/>
        <input name="" type="submit"  class="cancel" value="转" /></li>
        </ul>
    </div>
    </form>
    
    
    </div>
</body>

</html>
